package com.heima.mapper;

import com.heima.pojo.vo.VmPolicyVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface VmPolicyMapper {

    @Delete("delete from tb_vm_policy where policy_id = #{id}")
    void delByPolicyId(Integer id);

    @Delete("delete from tb_vm_policy where policy_id = #{policyId} and inner_code = #{innerCode};")
    void delByPolicyIdAndInnerCode(Integer policyId, String innerCode);
    @Select("select * from tb_vm_policy where inner_code = #{innerCode}")
    VmPolicyVo queryVmPolicy(String innerCode);
}
